package simulation;

/**
 * Authors: Kyle Martin
 * Purpose: Holds one plane until it is ready to leave.
 * Can be open or closed depending on the weather.
 * Version 1
 * Last updated: 11/1/11
 * Tested by:
 * Tested on:
 */
public class Runway 
{
	private
		boolean open;
		Plane currentPlaneOnRunway;
	//Constructor
	public Runway()
	{
		//By default when the runway is created it is open
		open = true;
	}
	
	//setter methods
	public void setOpen(boolean value)
	{
		open = value;
	}
	public void setPlane(Plane plane)
	{
		currentPlaneOnRunway = plane;
	}
	public void clearPlaneOnRunway()
	{
		currentPlaneOnRunway = null;
	}
	
	//getter methods
	//Returns wether the runway is opened or closed
	public boolean getStatus()
	{
		return open;
	}
	public Plane getPlaneOnRunway()
	{
		return currentPlaneOnRunway;
	}
}
